package cn.semyes.simi.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

import cn.semyes.simi.util.UserSecurityInterceptor;


/**
 * 拦截配置
 *
 */
@Configuration
public class WebMvcConf extends WebMvcConfigurerAdapter{
    @Autowired
    private UserSecurityInterceptor securityInterceptor;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(securityInterceptor).addPathPatterns("/simi/**");//配置拦截器拦截路径
        super.addInterceptors(registry);
    }
}
